﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 继承
{
    class Person
    {
        protected int id;
        protected string name;
        protected string sex;
        protected string cardid;
        protected string tel;
        public int Id { get => id; set => id = value; }
        public string Name { get => name; set => name = value; }
        public string Sex { get => sex; set => sex = value; }
        public string Cardid { get => cardid; set => cardid = value; }
        public string Tel { get => tel; set => tel = value; }


        public Person(int id, string name, string sex, string cardid, string tel)
        {
            this.id = id;
            this.name = name;
            this.sex = sex;
            this.cardid = cardid;
            this.tel = tel;
        }
        public void PrintFather()
        {
            Console.WriteLine("编号：" + Id);
            Console.WriteLine("姓名：" + Name);
            Console.WriteLine("性别：" + Sex);
            Console.WriteLine("身份证号：" + Cardid);
            Console.WriteLine("联系方式" + Tel);
        }
    }
}
